package com.witmore.skyline.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 摄像头抓拍图表
 * </p>
 *
 * @author 豆子高
 * @since 2025-03-14
 */
@Builder
@Getter
@Setter
@TableName("skyline_camera_pic")
public class CameraPicDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 摄像头id
     */
    @TableField("skyline_camera_id")
    private Integer skylineCameraId;

    /**
     * 摄像头序列号
     */
    @TableField("camera_sn")
    private String cameraSn;

    /**
     * 企业id
     */
    @TableField("org_id")
    private Integer orgId;

    /**
     * 摄像头抓拍照片
     */
    @TableField("pic_url")
    private String picUrl;

    /**
     * '1、定时任务拉取的图片 2、（云抓图）用户抓拍图  3、（本地截屏）用户抓拍图'
     */
    @TableField("source_type")
    private Integer sourceType;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 创建时间（抓拍时间）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField("camera_name")
    private String cameraName;

    @TableField("device_sn")
    private String deviceSn;

    @TableField("device_name")
    private String deviceName;

    /**
     * ai分析结果
     */
    @TableField("ai_result")
    private String aiResult;

    /**
     * ai分析等级
     */
    @TableField("ai_level")
    private String aiLevel;

    /**
     * ai分析等级 0：无人体数据 1：安全  2：违规 3：其他
     */
    @TableField("ai_level_type")
    private Integer aiLevelType;

    /**
     * ai分析结果
     */
    @TableField("ai_message")
    private String aiMessage;

    /**
     * 图片分析状态 0：未分析 1：已分析
     */
    @TableField("analyze_status")
    private Integer analyzeStatus;

    @TableField("project_id")
    private Integer projectId;

    @TableField("project_name")
    private String projectName;
}
